var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(c, b, a) {
    if (cm.getNumberFromQuestInfo(64085, "dir") >= 1) {
        action2(c, b, a)
    } else {
        action1(c, b, a)
    }
}

function action1(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.inGameDirectionEvent_SetAdditionalEffectVisibleForInGameDirection();
            cm.inGameDirectionEvent_AskAnswerTime(500)
        } else {
            if (status === a++) {
                cm.fieldEffect_ProcessOnOffLayer("0", "Map/EffectPL.img/MONAD1/illust/0", 0, 1000, 0, 0, 15, 4, 0);
                cm.inGameDirectionEvent_AskAnswerTime(3000)
            } else {
                if (status === a++) {
                    cm.onTeleport(0, 3, cm.getPlayer().getId(), 940, 450);
                    cm.sendNormalTalk_Bottom("#b看来这是老婆婆的孙女啊……看起来很幸福。", 57, 0, false, true)
                } else {
                    if (status === a++) {
                        cm.sendNormalTalk_Bottom("#b青灰色的皮肤，有魔族的纹样。没有翅膀，看来是混血……", 57, 0, true, true)
                    } else {
                        if (status === a++) {
                            cm.sendNormalTalk_Bottom("#face4#…… 少女……", 37, 9400580, true, true)
                        } else {
                            if (status === a++) {
                                cm.fieldEffect_ProcessOnOffLayer("0", "", 2, 1000, 0, 0, 0, 0, 0);
                                cm.inGameDirectionEvent_AskAnswerTime(4000)
                            } else {
                                if (status === a++) {
                                    cm.userSetFieldFloating(867201801, 2, 2, 2);
                                    cm.setMobImage("PL_MONAD.img/EP1/ACT2/monsterfootstep_loop", 100);
                                    cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402270/Attack7", 128);
                                    cm.inGameDirectionEvent_AskAnswerTime(3000)
                                } else {
                                    if (status === a++) {
                                        cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402245/Attack2", 128);
                                        cm.inGameDirectionEvent_AskAnswerTime(500)
                                    } else {
                                        if (status === a++) {
                                            cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402247/Attack1", 128);
                                            cm.inGameDirectionEvent_AskAnswerTime(500)
                                        } else {
                                            if (status === a++) {
                                                cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402250/Attack5", 128);
                                                cm.inGameDirectionEvent_AskAnswerTime(500)
                                            } else {
                                                if (status === a++) {
                                                    cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402247/Attack2", 128);
                                                    cm.inGameDirectionEvent_AskAnswerTime(1000)
                                                } else {
                                                    if (status === a++) {
                                                        cm.sendNormalTalk_Bottom("#face3#什么？！", 37, 9400580, false, true)
                                                    } else {
                                                        if (status === a++) {
                                                            cm.sendNormalTalk_Bottom("#b嘘！", 57, 0, true, true)
                                                        } else {
                                                            if (status === a++) {
                                                                cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402250/Attack4", 128);
                                                                cm.inGameDirectionEvent_AskAnswerTime(500)
                                                            } else {
                                                                if (status === a++) {
                                                                    cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402252/Attack2", 128);
                                                                    cm.inGameDirectionEvent_AskAnswerTime(500)
                                                                } else {
                                                                    if (status === a++) {
                                                                        cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402246/skill1", 128);
                                                                        cm.inGameDirectionEvent_AskAnswerTime(500)
                                                                    } else {
                                                                        if (status === a++) {
                                                                            cm.fieldEffect_PlayFieldSound("Sound/Mob.img/9402241/Attack1", 128);
                                                                            cm.inGameDirectionEvent_AskAnswerTime(1000)
                                                                        } else {
                                                                            if (status === a++) {
                                                                                cm.inGameDirectionEvent_ForcedFlip10(1, 300);
                                                                                cm.inGameDirectionEvent_AskAnswerTime(251)
                                                                            } else {
                                                                                if (status === a++) {
                                                                                    cm.inGameDirectionEvent_ForcedFlip10(3, 80);
                                                                                    cm.inGameDirectionEvent_AskAnswerTime(251)
                                                                                } else {
                                                                                    if (status === a++) {
                                                                                        cm.inGameDirectionEvent_ForcedFlip10(1, 300);
                                                                                        cm.inGameDirectionEvent_AskAnswerTime(251)
                                                                                    } else {
                                                                                        if (status === a++) {
                                                                                            cm.fieldEffect_InsertCanvas(1, 255, 240, 240, 240, 1300, 0);
                                                                                            cm.inGameDirectionEvent_AskAnswerTime(1600)
                                                                                        } else {
                                                                                            if (status === a++) {
                                                                                                cm.updateInfoQuest(64085, "dir=1");
                                                                                                cm.warp(867201802, 0);
                                                                                                cm.setInGameDirectionMode(false, true, false);
                                                                                                cm.dispose()
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

function action2(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.inGameDirectionEvent_AskAnswerTime(500)
        } else {
            if (status === a++) {
                cm.fieldEffect_ProcessOnOffLayer("0", "Map/EffectPL.img/MONAD1/illust/0", 0, 1000, 0, 0, 15, 4, 0);
                cm.inGameDirectionEvent_AskAnswerTime(3000)
            } else {
                if (status === a++) {
                    cm.fieldEffect_ProcessOnOffLayer("0", "", 2, 1000, 0, 0, 0, 0, 0);
                    cm.inGameDirectionEvent_AskAnswerTime(1000)
                } else {
                    if (status === a++) {
                        cm.setInGameDirectionMode(false, true, false);
                        cm.dispose()
                    }
                }
            }
        }
    }
};